<template>
	<view style="overflow-x: hidden;">
			
		<view class="nav-back">
			<top-heigth backTitle="招聘/合作"></top-heigth>
		</view>	
		
		<view class="content-box" style="background-color: #fff;">
			<view class="time-top">
				<view @click="titleChange(1)" :class="num == 1 ? 'title-font choose':'title-font'">商家</view>
				<view @click="titleChange(2)" :class="num == 2 ? 'title-font choose':'title-font'">技师</view>
			</view>
		</view>
		
		
		
		<view class="content-box m-t24">
			<view v-if="num == 1" class="public-box m-t24">
				<view class="notice-list">
					<rich-text :nodes="list1.configValue"></rich-text>
				</view>
			</view>
			<view v-if="num == 2" class="public-box m-t24">
				<view class="notice-list">
					<rich-text :nodes="list2.configValue"></rich-text>					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import TopHeigth from '@/components/TopHeigth.vue'
	
	export default {
		data() {
			return {
				num: null,
				list1:'',
				list2:'',
			}
		},
		components: { TopHeigth },
		onLoad(e) {
			this.num = e.id
			this.jsBox()
			this.sjBox()
		},
		methods: {
			//技师
			jsBox(){
				uni.$u.http.post('/api/shop/v1_0/tAppConfigRCA/turnTAppConfigInfo',{
					configCode:"partnerStaff"
				}).then((res) => {
					this.list1 = res.data
				}) 
			},
			sjBox(){
				 uni.$u.http.post('/api/shop/v1_0/tAppConfigRCA/turnTAppConfigInfo',{
					configCode:"partnerSupplier"
				}).then((res) => {
					this.list2 = res.data
				}) 
			},
			titleChange(n){
				this.num = n
			}
		}
	}
</script>

<style lang="scss" scoped>
	@mixin flex($direction: row) {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: $direction;
	}
	.uv-nav-slot {
		@include flex;
		align-items: center;
		justify-content: space-between;
		border-width: 0.5px;
		border-radius: 100px;
		border-color: #dadbde;
		padding: 3px 7px;
		opacity: 0.8;
	}
	.time-top{
		@include flex;
		align-content: space-between;
		width: 100%;
		padding-top: 20rpx;
		.title-font{
			font-size:28rpx;
			color: #333;
			text-align: center;
			padding-bottom: 16rpx;
			margin-right: 56rpx;
		}
		.choose{
			font-weight: bold;
			background: url("/static/image/title-line.png") no-repeat bottom center;
		}
	}
</style>
